package com.tl.mq.rocket_mq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(consumerGroup = "spring-consumer-one",topic = "fileUpload")
public class RocketMqConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println("开始消费数据！！！");

        System.out.println("消费的数据：" + s);

        System.out.println("消费数据结束！！！");
    }

}
